package com.soft.mainsite.mybatis.mapper;

import com.soft.mainsite.mybatis.model.TCmsModelFiled;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * TCmsModelFiledMapper
 *
 * @author Jin
 * @create 2017-06-16
 **/
public interface TCmsModelFiledMapper extends Mapper<TCmsModelFiled> {

    /**
     * 根据模型id查询
     *
     * @param modelId
     * @return
     */
    @Select("select * from  t_cms_model_filed where model_id = #{id}")
    @ResultMap("BaseResultMap")
    List<TCmsModelFiled> selectByModelId(@Param("id") Integer modelId);

    /**
     * 根据id查询模型
     *
     * @param filedId
     * @return
     */
    @Select("select * from  t_cms_model_filed where filed_id = #{id}")
    @ResultMap("BaseResultMap")
    TCmsModelFiled selectModelFiledById(@Param("id") Integer filedId);
}